package com.hs.shirodemo2.controller;

import com.hs.shirodemo2.constant.SystemCode;
import com.hs.shirodemo2.utils.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ShiroInfoController
 * @Description  登录失败或没有权限是的跳转路径
 */
@RestController
@RequestMapping("/pub")
public class ShiroInfoController {

    @RequestMapping("/notLogin")
    public Result noLogin(){
        return new Result(SystemCode.NOT_LOGIN.getCode(),SystemCode.NOT_LOGIN.getMessage(), null);
    }

    @RequestMapping("/noPermitted")
    public Result noPermission(){
        return Result.error(SystemCode.NO_PERMISSION.getCode(),SystemCode.NO_PERMISSION.getMessage(), null);
    }
}
